package user;

import operation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2022-08-23
 * Time: 21:13
 * name：管理员
 */
public class Administrator extends User{

    //管理员构造器
    public Administrator(String name) {
        super(name);

        this.iOperations = new IOperation[]{
                new ExitOperation(),  // 0下标
                new AddOperation(),  //1 下标
                new DelateOperation(),// 2 下标
                new FindOperation(),  // 3 下标
                new DisplayOperation(),// 4 下标

        };
    }

    //管理员菜单
    public int menu(){

        System.out.println("----------------------------------");
        System.out.println("你好！ "+name+"管理员，你已进入图书系统！");
        System.out.println("1. 添加图书 2. 删除图书 ");
        System.out.println("3. 查找图书 4. 显示图书 ");
        System.out.println("0. 退出图书系统");
        System.out.println("----------------------------------");

        Scanner scanner = new Scanner(System.in);
        int choose = scanner.nextInt();
        return choose;

    }
}
